﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLNS.Models
{
    public class TreeLeftModels
    {
        //danh sach can bo
        public static List<CanBo> GetDSCanBo()
        { 
            //khoi tao db
            ITAPMNS2013Entities context = new ITAPMNS2013Entities();
            var query = from cb in context.DSCanBo
                        select cb;
            return query.ToList<CanBo>();
        }
        //danh sach can bo
        public static List<PhongBan> GetDSPhongBan()
        {
            //khoi tao db
            ITAPMNS2013Entities context = new ITAPMNS2013Entities();
            var query = from pb in context.DSPhongBan
                        select pb;
            return query.ToList<PhongBan>();
        }
    }
}